package controllers

import (
	"beeblog/models"
	"github.com/astaxie/beego"
)

type MainController struct {
	beego.Controller
}

func (this *MainController) Get() {
	this.Data["isHome"] = true
	this.Data["isLogin"] = checkLoginStatus(this.Controller)
	topicList, err := models.AllTopic(true)
	if err == nil {
		this.Data["topicList"] = topicList
	}

	this.TplName = "home.html"
}
